Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run cm analyses tests #148

Merged
merged 8 commits into from
Sep 11, 2023
Merged

Run cm analyses tests #148

merged 8 commits into from
Sep 11, 2023

Conversation

mvankessel-EMC
Copy link
Collaborator

I've added dedicated unit tests for runCmAnalyses().

I've added the following files:

  1. setup-runCmAnalyses.R (mostly copied from test-eunomia.R)
  2. test-runCmAnalyses.R

I've also changed the following in the existing code:

  1. Replaced the for-loop checks for cmAnalysisList and targetComparatorOutcomesList to assert class "cmAnalysis" and "targetComparatorOutcomes". Both assertions now expect the list to contain those object types instead.
  2. Added a warning message when analysesToExclude has 0 rows.

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.29% ⚠️

Comparison is base (e1b07c6) 88.31% compared to head (158bc82) 88.02%.
Report is 7 commits behind head on develop.

❗ Current head 158bc82 differs from pull request most recent head a7779c3. Consider uploading reports for the commit a7779c3 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #148      +/-   ##
===========================================
- Coverage    88.31%   88.02%   -0.29%     
===========================================
  Files           23       23              
  Lines         5415     5380      -35     
===========================================
- Hits          4782     4736      -46     
- Misses         633      644      +11     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@schuemie
Copy link
Member

schuemie commented Sep 4, 2023

Again great work!

I'm not so sure about the warning for a zero-row analysesToExclude. It seems just another valid way to say no analyses should be excluded. What is your reasoning for throwing a warning?

@mvankessel-EMC
Copy link
Collaborator Author

Again great work!

I'm not so sure about the warning for a zero-row analysesToExclude. It seems just another valid way to say no analyses should be excluded. What is your reasoning for throwing a warning?

My thinking was that if you do not want to exclude any analyses most people will pass NULL to analysesToExclude, or leave out the option all together in their function call. I think passing an empty data.frame instead is odd, and maybe (probably?) not intentional. Especially when the data.frame is created programmatically.

It could be a message instead of a warning, but I think informing the user on the behavior like this is useful.

@schuemie
Copy link
Member

Ok, let's keep as is.

@schuemie schuemie merged commit 79ab1e7 into develop Sep 11, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants